If a system has a transfer function G(s), its frequency response is G(jw) (it is only evaluated for values of s which are on the jw axis). Since G(jw) is a complex number, it is usually represented in two different plots, one for its magnitude and the other for its phase, both as functions of w. These two plots together are called the Bode plot of the system. By using a log scale for the frequency and the magnitude, and a linear scale for the phase, the composition of two systems (in series) is easily accomplished by adding together their Bode plots. For example, consider a standard second-order system (mass-spring-damper):
1
G1(s) = -------------
s^2 + s/2 + 1and find its Bode plot using matlab: numG1 = 1; denG1 = [1 0.5 1]; bode(numG1,denG1);
Now add an integrator (a pole at the origin)
G2(s) = 1/s numG2 = 1; denG2 = [1 0]; bode(numG2,denG2);
The combined system has a transfer function given by:
G(s) = G1(s) G2(s) [numG,denG] = series(numG1,denG1,numG2,denG2); bode(numG,denG); subplot(2,1,1); axis([0.1 10 -60 20]);
which is the sum of the two individual Bode plots. Note the subplot and axis commands which change the scale on the magnitude plot only.
There are several characteristics of a system that you can read directly from its Bode plot:
Bandwidth. Sinusoidal inputs with frequency less than w_BW are tracked "reasonably well" by the system. Sinusoidal inputs with frequency greater than w_BW are attenuated by a factor of 0.707 or greater. Locate the point 0.7 on the magnitude axis (or -3dB), and draw a line across until it hits the plot of |G(s)|. Read down to find w_BW, as shown in the figure:
[m,p,w]=bode(numG1,denG1); loglog(w,m); axis([0.1 10 0.01 10]); grid;
You can find the output of a system to a sinusoidal input by using the lsim command in matlab:
t=0:0.1:50; u = sin(0.3*t); [y,x] = lsim(numG1,denG1,u,t); plot(t,y,t,u)
t=0:0.1:10; u = sin(3*t); [y,x] = lsim(numG1,denG1,u,t); plot(t,y,t,u)
Note the phase lag as well as the magnitude attenuation in the second plot.
Questions:
System Type. The system type is the number of (open-loop) poles at s=0, and is the (negative of the) slope of the low-frequency portion of the magnitude Bode plot. By Bode's gain-phase relationship:
<G(jw) = n x 90 (n is the slope of |G(jw)|)the type is also the same as the phase of G(jw) for low frequencies divided by 90 degrees. With unity feedback, a Type 1 system has zero steady-state error to a step input and a Type 2 system has zero steady-state error to a ramp input.
Questions:
Remember the table which gives steady-state errors as a function of system type (under unity feedback):
step ramp t^2
-----------------------------------------------------
1
type 0 -------- inf. inf.
1 + K0
-----------------------------------------------------
1
type I 0 ---- inf.
K0
-----------------------------------------------------
1
type II 0 0 ----
K0
-----------------------------------------------------Also remember that
adding a proportional gain to the system will change only the magnitude portion
of the Bode plot (and hence the steady-state error).
Questions (assume unity feedback in all cases):
Roll-off rate. The roll-off rate is the rate at which the magnitude of the transfer function "rolls off" for high frequencies. It is the slope of the |G(jw)| curve for large w. Because each pole contributes -1 to the slope and each zero contributes +1, we have
roll-off rate = n-m
= number of poles - number of zeros
= number of zeros at infinity.By Bode's gain-phase
relationship, the roll-off rate can also be read off the phase plot as the phase
at high frequencies divided by 90 degrees.
Questions:
If the gain is greater than 1 (0dB) then the system is unstable at K=1, and the gain margin is negative (dB) or < 1 (magnitude). If the phase never crosses 180, then the system is stable for all gains and the gain margin is infinite.
Phase margin. The analog of the gain margin is the phase margin. This is found from the Bode plot as the difference from the phase from 180 when the magnitude is equal to 1 (or 0dB).
If the phase is less than -180 when the magnitude is equal to one, then the closed-loop system is unstable for K=1. The phase margin for different proportional gains K can also be found from the Bode plot. When the system |KG(jw)| crosses magnitude 1, then |G(jw)| crosses magnitude 1/K. Shown above is the calculation for K = 1/3 (20 log (1/K) = 9.5 dB).
The phase margin is related to the damping of the closed-loop system by the equation:
zeta
PM ~= ------
100This is a reasonably good approximation for PM < 70 (zeta
< 0.7).
Questions:
Please send any comments, clarifications, suggestions, or corrections to: tilbury@umich.edu. Thanks! I hope you found this document helpful.